#include <iostream>
#include <string>
using namespace std;
class test1
{
public:
    test1() = default;
    test1(double *temp) : a(temp) { cout << "crete a" << endl; }
    double *a = new double[10];
    ~test1()
    {
        cout << "delete a" << endl;
        delete a;
    }
};
test1 test_2()
{
    test1 a;
    return a;
}
int main()
{
    test_2();
    double *temp = new double[10];
    temp[0] = 10;
    test1 *st = new test1(temp);
    cout << *(st->a) << endl;
    delete temp;
}